//
//  AELTrackControlCell.swift
//  ActualExaminationLine
//
//  Created by iOS-Czz on 2023/10/30.
//

import UIKit

class AELTrackControlCell: UITableViewCell {
   
    @IBOutlet var typeLabel: UILabel!
    @IBOutlet var icon: UIImageView!
    @IBOutlet var nameLabel: UILabel!
    @IBOutlet var timeLabel: UILabel!
    @IBOutlet var durationLabel: UILabel!
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)
        
        // Configure the view for the selected state
    }

    var model: AELTrackControlModel? {
        didSet {
            self.icon.image = UIImage(named: self.model?.type == 0 ? "page_01_list_reservation_icon":"page_01_list_book_icon")
            self.typeLabel.text = self.model?.type == 0 ? "Practice\nreservation":"Test booking"
            self.nameLabel.text = self.model?.name
            self.timeLabel.text = "Appointment time: " + self.model!.date + " " + self.model!.time
            self.durationLabel.text = "Reservation duration: " + self.model!.duration
        }
    }
    
}
